package com.shd.edanpei.ui.adapter;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseViewHolder;
import com.shd.edanpei.R;
import com.shd.edanpei.base.BaseQuickImageAdapter;

/**
 * Created by mc on 2018/12/27.
 * yang-wen-wen
 */

public class PublishOrderAdapter extends BaseQuickImageAdapter<String> {

    public PublishOrderAdapter(Context context) {
        super(context, R.layout.item_publish_order);
    }

    @Override
    protected void convert(BaseViewHolder helper, String item) {


        if (helper.getLayoutPosition() != getData().size() - 1) {
            helper.getView(R.id.right).setVisibility(View.GONE);
        } else {
            helper.getView(R.id.right).setVisibility(View.VISIBLE);
        }


        Glide.with(mContext).load(item).into((ImageView) helper.getView(R.id.iv_banner));
    }


}
